import yaml


class Utils:
    @classmethod
    def get_yaml_data(cls, file_path):
        with open(file_path, 'r', encoding='utf-8') as f:
            res = yaml.safe_load(f)
            return res

    @classmethod
    def input_yaml_data(cls, data, file_path):
        with open(file_path, 'w', encoding='utf-8') as f:
            res = yaml.safe_dump(data ,f)
            return res


if __name__ == '__main__':
    print(Utils.get_yaml_data("../config/datas.yaml"))

